//导入request.js请求工具
import request from '@/utils/request.js'

//提供调用分页查询图书接口的函数
export const bookSearchService = (query)=>{
    return request.get('/book/search',{params: query})
}

//提供调用添加图书接口的函数
export const bookAddService = (formData)=>{
    return request.post('/book',formData)
}

//提供获取图书详情的函数
export const bookDetailService=(id)=>{
  return request.get(`/book/detail/${id}`)
}


//提供修改图书的函数
export const bookUpdateService=(formData)=>{
  return request.put(`/book`,formData)
}


//提供删除图书的函数
export const bookDeleteService=(id)=>{
  return request.delete(`/book/${id}`)
}